package service;

import Util.SqlSessionUtil;
import dao.ZhejiangGuaranteeMapper;
import dao.ZhejiangPriceIndexMapper;
import domain.ZhejiangGuarantee;
import domain.ZhejiangPriceIndex;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class ZhejiangGuaranteeService {
    public List<ZhejiangGuarantee> selectByYear(Integer year) {
        SqlSession session = SqlSessionUtil.getSession().openSession();
        ZhejiangGuaranteeMapper operation = session
                .getMapper(ZhejiangGuaranteeMapper.class);
        List<ZhejiangGuarantee> zjpiList = operation.selectByYear(year);
        session.commit();
        session.close();
        return zjpiList;
    }

    public static void main(String[] args) {
        ZhejiangGuaranteeService z = new ZhejiangGuaranteeService();
        System.out.println(z.selectByYear(2016));

    }
}
